Script: Deprecate script context cache #79505
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deprecate the script context cache in favor of the general cache.
Users should use the following settings:
script.max_compilations_rate
to set the max compilation ratefor user scripts such as filter scripts. Certain script contexts
that submit scripts outside of the control of the user are
exempted from this rate limit. Examples include runtime fields,
ingest and watcher.
script.cache.max_size
to set the max size of the cache.script.cache.expire
to set the expiration time for entries inthe cache.
Whats deprecated?
script.max_compilations_rate: use-context
. This specialsetting value was used to turn on the script context-specific caches.
script.context.$CONTEXT.cache_max_size
, usescript.cache.max_size
instead.
script.context.$CONTEXT.cache_expire
, usescript.cache.expire
instead.
script.context.$CONTEXT.max_compilations_rate
, usescript.max_compilations_rate
instead.The default cache size was increased from
100
to3000
, whichwas approximately the max cache size when using context-specific caches.
The default compilation rate limit was increased from
75/5m
to150/5m
to account for increasing uses of scripts.Refs: #62899